package com.haoxin.ai_course.modules.course.controller;

import java.util.List;
import java.util.Map;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.haoxin.ai_course.common.base.AbstractController;
import com.haoxin.ai_course.common.utils.HttpJsonResult;
import com.haoxin.ai_course.common.utils.R;
import com.haoxin.ai_course.modules.course.entity.AcFamousQuotes;
import com.haoxin.ai_course.modules.course.entity.VO.AcFamousQuotesVO;
import com.haoxin.ai_course.modules.course.service.AcFamousQuotesService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import ma.glasnost.orika.MapperFacade;



/**
 * 名人名言表
 * 
 * @author xingxiangguo
 * @email bugcn@qq.com
 * @date 2022-06-06 09:44:49
 */
@RestController
@AllArgsConstructor
@RequestMapping("/app/course/acfamousquotes")
@Api(value="api",tags="app小程序-名人名言管理")
public class AcFamousQuotesController  extends AbstractController {
    private final  AcFamousQuotesService acFamousQuotesService;
    private MapperFacade mapperFacade;
    /**
     * 列表
     */
    @ApiOperation("名人名言列表")
    @RequestMapping("/fullList")
    public HttpJsonResult<List<AcFamousQuotesVO>> fullList(){
    	 HttpJsonResult<List<AcFamousQuotesVO>> result = new  HttpJsonResult<List<AcFamousQuotesVO>>();
    	 List<AcFamousQuotes> list = acFamousQuotesService.list();
    	 List<AcFamousQuotesVO> voList = mapperFacade.mapAsList(list, AcFamousQuotesVO.class);
    	 result.setData(voList);
    	 return result;
    }

	
}
